package cn.oms.oms.mapper;

import cn.oms.oms.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/** 基于SSM的门诊管理系统 曾晨AllenChen版权所有@1.0.0 **/

/**
* <p>
    *  Mapper 接口
    * </p>
*
* @author AllenChen曾晨
* @since 2022-04-29
*/
@Repository
public interface UserMapper extends BaseMapper<User> {

    //根据用户名查询用户对象
    @Select("select * from user where userName=#{username}")
    User findUserByUsername(String username);

    //根据用户名查询用户对象
    @Select("select * from user where userNickName=#{nickname}")
    User findUserByNickname(String nickname);

    //根据用户名查询用户对象
    @Select("select * from user where userId=#{userId}")
    User findUserByUserId(int userId);


}
